package basic.socket.udp.thread;

import java.io.IOException;
import java.net.DatagramSocket;

/**
 * @author bingo
 * @Description
 * @Date 2018/7/18
 */
public class ChatRoom {

    public static void main(String[] args) throws IOException {
        DatagramSocket dsSend = new DatagramSocket();
        DatagramSocket dsReceive = new DatagramSocket(8888);

        SendThread st = new SendThread(dsSend);
        ReceiveThread rt = new ReceiveThread(dsReceive);

        Thread t1 = new Thread(st);
        Thread t2 = new Thread(rt);

        t1.start();
        t2.start();
    }
}
